﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity;
using Shop.Infrastructure.Containers;
using Shop.Core.Events;
using Shop.Service.Catalog;
using Shop.Service.Orders;
using Shop.Core.Domain.Catalog;
using Shop.Service.Customers;
using Shop.Service.Security;

namespace Shop.Service
{
    public class DependencyRegistrar : IDependencyRegistrar
    {
        public void Register()
        {
            Container.Current.RegisterType<ICustomerService, CustomerService>();
            Container.Current.RegisterType<IProductService, ProductService>();
            Container.Current.RegisterType<IOrderService, OrderService>();
            Container.Current.RegisterType<IConsumer<EntityRequired<Product, string>>, ProductService>("ProductEntityRequired");
            Container.Current.RegisterType<IEncryptionService, EncryptionService>();
        }

        public int Order
        {
            get
            {
                return 2;
            }
        }
    }
}
